//组合总和  力扣377
//完全背包   装满背包有几种选择
//排列    先遍历背包再遍历物品
class Solution {
public:
	int combinationSum4(vector<int>& nums, int target) {
		vector<uint64_t> dp(target+1);
		//初始化    
		dp[0] = 1;
		//递推
		for(int i = 1; i <= target; i++)
		{
			for(int j = 0; j < nums.size(); j++)
			{
				if(i < nums[j]) continue;
				else dp[i] = dp[i] + dp[i-nums[j]];
			}
		}
		return dp[target];
		
	}
};
